import 'package:flutter_test/flutter_test.dart';
import 'package:pang_rowth_plugin/pang_rowth_plugin.dart';
import 'package:pang_rowth_plugin/pang_rowth_plugin_platform_interface.dart';
import 'package:pang_rowth_plugin/pang_rowth_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockPangRowthPluginPlatform
    with MockPlatformInterfaceMixin
    implements PangRowthPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final PangRowthPluginPlatform initialPlatform = PangRowthPluginPlatform.instance;

  test('$MethodChannelPangRowthPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelPangRowthPlugin>());
  });

  test('getPlatformVersion', () async {
    PangRowthPlugin pangRowthPlugin = PangRowthPlugin();
    MockPangRowthPluginPlatform fakePlatform = MockPangRowthPluginPlatform();
    PangRowthPluginPlatform.instance = fakePlatform;

    expect(await pangRowthPlugin.getPlatformVersion(), '42');
  });
}
